const useRegular = () => {
  const regEmail = (val: string) => {
    //Email正则
    var ePattern =
      /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
    //正确输出 true
    return ePattern.test(val);
  };
  return {
    regEmail,
  };
};

export default useRegular;
